package com.itheima.switchdemo;

/*
       switch新特性
         JDK12
*/

public class SwitchDemo3 {
    public static void main(String[] args) {
        //需求：
        //123 一二三
        /*int numble = 1;
        switch (numble){
            case 1:
                System.out.println("numble的值为一");
                //break;
            case 2:
                System.out.println("numble的值为二");
                //break;
            case 3:
                System.out.println("numble的值为三");
                //break;
            default:
                System.out.println("没有这种选项");
                //break;
        }*/

        int numble = 10;
        switch (numble){
            case 1 -> System.out.println("一");
            case 2 -> System.out.println("二");
            case 3 -> System.out.println("三");
            default -> System.out.println("没有这个选项");
        }
    }
}
